package ro.isdc.navigator.retriever;

import java.util.List;

/**
 * The retriever interface. A retriever is usually responsible
 * with handling low SQL programming. The various retriever implementations
 * depend on the SQL programming implementation library. (i.e Hibernate, JDBC, JPA).
 * 
 * @author Andrei Chirila / ISDC! Romania
 * @version 1.0
 * @date Jun 30, 2009 
 * @param <T> the object that constitutes within the results.
 */
public interface IRetriever<T> {
  
  /**
   * Get the list of results of type <T>.
   * 
   * @param startIndex the startIndex from where to start the result
   * @param blockSize the block size of the query results
   * @param args the arguments
   * @return the list of results of type <T>
   */
  List<T> getResults(final int startIndex, final int blockSize,
      final List<Object> args);

  /**
   * Get the number of results.
   * 
   * @param args the arguments
   * @return the number of results
   */
  long getNumberOfResults(final List<Object> args);
}
